<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="copyright" content="www.apicloud.com" />
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<title>舆情工作平台登陆</title>
<link rel="stylesheet" type="text/css" href="../css/login.css" />
<style>
	html {height: 100%;  }
	body { margin:0 auto; padding:0;height: 100%;width:100%; background:rgba(0,0,0,0.3);}	
	 
	#main{ line-height:26px; padding-top:5px;width: 90%; position: absolute; left:5%; bottom:0; }
	#method{-webkit-border-radius: 10px;border-radius:10px; text-align: center; border:1px solid #D4D3D3; padding: 10px 0px;margin-bottom: 10px;background-color: #fff;}	 
    
    .btn {margin:3px 10px;}
	.btn {background: fff;color: #A5A5A5; border:1px solid #B8B8B8;height: 40px; text-align: center; line-height: 40px; font-size: 20px;margin-top: 20px;border-radius: 5px;} 
	.btn:hover {background: red;color: #fff; border:1px solid #B8B8B8;height: 40px; text-align: center; line-height: 40px; font-size: 20px;margin-top: 20px;border-radius: 5px;} 
	
	.btn_x {margin:3px 10px;}
	.btn_x {background: red;color: #fff; border:1px solid #B8B8B8;height: 40px; text-align: center; line-height: 40px; font-size: 20px;margin-top: 20px;border-radius: 5px;} 
	.btn_x>span{ float: right; right:15%; position: absolute;} 
    
    .main{margin:3px 10px; text-align: left;text-indent: 2em;}
    
     #method ul {display: -webkit-box; display: -webkit-flex; display: flex;}
     #method ul li{position: relative;width:33.33%; height: 80px; margin-top:10px;list-style-type:none; }
     #method ul .btn1{background:url(../image/btn/qq.png) no-repeat; text-align:center; }
     #method ul .btn2{background:url(../image/btn/wx.png) no-repeat; text-align:center;}
     #method ul .btn3{background:url(../image/btn/dx.png) no-repeat; text-align:center;}
     #method ul li a{text-align:center; padding-left:20px; display:block; top:70px; position: absolute;}
</style>
</head>
<body tapmode="buyhover" onclick="checkform(3)">
   <div id="header"></div>
   <div id="main">
       <div id="method">
            
       </div>
       <div id="method" tapmode="buyhover" onclick="checkform(3)">取消</div>
	</div>	
<input id="access_token" type="hidden" value=""/>
<input id="admin_id" type="hidden" value=""/>

<input id="deal_status" type="hidden" value="0"/>	 
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/api.data.js"></script>
<script type="text/javascript" src="../script/jquery.md5.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript">
   apiready = function(){  
       
       //在页面制定位置输出接口所需的access_token和admin_id
       get_sign(); 
           
       var status = api.pageParam.status;//获取点击的菜单号并显示对应的信息       
       var deal_status = api.pageParam.deal_status;//获取操作内容的处置状态
       var is_pass = api.pageParam.is_pass;//获取操作内容的申请状态
       var pass_status = api.pageParam.pass_status;//获取操作内容的申请进度
       var forwarding_status = api.pageParam.forwarding_status;//0是没有转办    1是已转办 ，2是已处理完
                   
       if(status == 1){
            if(deal_status == 0){//根据处置状态显示处置情况
               document.getElementById("method").innerHTML ='<div class="title">设置状态</div><div class="btn" tapmode="buyhover" onclick="checkform(1)">处置中</div><div class="btn" tapmode="buyhover" onclick="checkform(2)">处置完毕</div>'; 		  
            }else  if(deal_status == 1){
            	if(1==forwarding_status){
            		document.getElementById("method").innerHTML ='<div class="title">设置状态</div><div class="btn_x" >处置中<span>√</span></div><div class="btn" tapmode="buyhover" onclick="checkform(2)">处置完毕(审核中)</div>'; 
            	}else{
               		document.getElementById("method").innerHTML ='<div class="title">设置状态</div><div class="btn_x" >处置中<span>√</span></div><div class="btn" tapmode="buyhover" onclick="checkform(2)">处置完毕</div>'; 		  
            	}
            } 
       }else if(status == 2){
            if(is_pass == 0){//如果可以申请，显示申请信息，否则显示申请进度
               document.getElementById("method").innerHTML ='<div class="title">标无效申请</div><div class="main">若此条信息不属于自己的处置范围或无法处置，可以申请将此信息标为无效，审核通过后删除此信息。</div><div class="btn" tapmode="buyhover" onclick="checkform(4)">确认申请</div>'; 		  
            }else{
                if(pass_status == 0){//审核中
                      document.getElementById("method").innerHTML ='<div class="title">标无效申请</div><div class="main">申请状态：已申请</div><div class="main" >审核状态：审核中</div>'; 		              
                } 
            }
       }else if(status == 4){
          document.getElementById("method").innerHTML ='<ul><li class="btn1" tapmode="activebtn0 activebtn" onclick="openWin(0)"><a class="bottom_btn bbtn01 weixin">QQ</a></li><li class="btn2" tapmode="activebtn1 activebtn" onClick="openWin(1)"><a class="bottom_btn bbtn02 communicate">微信</a></li><li class="btn3" tapmode="activebtn2 activebtn" onClick="openWin(2)"><a class="bottom_btn bbtn03 discover">短信</a></li></ul> '; 		  
       }             
   }
    
 
	function checkform(sortId) {
	    
	  var message_id = api.pageParam.message_id;//获取操作内容id  
	  if(sortId == '1' || sortId == '2'){	    
	      api.openWin({
	          name: 'disposalWin',
	          url: './disposalWin.html',
	          delay: 300,
	          pageParam:{message_id:message_id,sortId:sortId},
	          bounces: false,
          });
	  }else if(sortId == '2'){	   
	      api.openWin({
	          name: 'disposaloverWin',
	          url: './disposaloverWin.html',
	          delay: 300,
	          pageParam:{message_id:message_id},
	          bounces: false,
          });
	  }else if(sortId == '4'){
	       pass(message_id);
	  }else if(sortId == '3'){
	       api.closeFrame({name: 'operationFrame'});
	        
	  }	 	
	}
	
	
	function openWin(sortId){
	  var url = api.pageParam.url;//获取传递的参数	
	  var title = api.pageParam.title;//获取传递的参数
	  var content = api.pageParam.content;//获取传递的参数
	  
	  if(sortId == 0){//qq分享
          goto_qq(url,title,content);
	    
	  }else if(sortId == 2){//短信分享
	          api.sms({
                    numbers: [''],
                    text: '分享自舆情处置平台,【'+title+'】'+url
              });
	  }else if(sortId == 1){//微信分享
	      api.openFrame({
              name: 'shareFrame',
              url: './shareFrame.html',
              rect:{
                   x:0,
                   y:0,
                   w:0,
                   h:0
               },
    pageParam: {url:url,title:title,content:content},
   
});
	  }
	}
	
	function goto_qq(url,title,content){ 
	     var obj = api.require('qq'); 
             obj.shareNews({
				url:url,
				title:title,
				description:content,
				imgUrl:'http://qingbao.dzwww.com/test/yqzyz.png',				        
			    type:'QFriend'
		     },function(ret_fx,err_fx){
					if(ret_fx.status){
						api.alert({title: '系统提示',msg: '分享成功', buttons: ['确定']});
					}else{
						api.alert({title:'系统提示',msg:err_fx.msg});  
					}
			  });          
	}
	
 
	 

</script>
</html>